import request from '@/utils/request'

export default {
  //1. 查询所有学生
  findStudens(){
    return request({
      url: '/student/list2',
      method:'get'
    })
  },
  // 2. 条件查询带分页
  search(page,pageSize,data){
    return request({
      url: `/student/search/${page}/${pageSize}`,
      method:'post',
      data,
    })
  },
  //3. 查询所有学生
  findById(sid){
    return request({
      url: '/student/findById/'+ sid,
      method:'get'
    })
  },
  //4. 保存学生
  save(url,data){
    return request({
      url,
      method:'post',
      data
    })
  },
}
